import {WeaTools} from 'ecCom'

// 项目类型-树形
export const getPrjTypeTreePageList = params => {
	return WeaTools.callApi('/api/proj/pcproject/getPrjTypeTree', 'GET', params);
}
//列表
export const getPrjTypeList = params => {
	return WeaTools.callApi('/api/proj/pcproject/getPrjExecuteList', 'GET', params);
}
//项目执行 高级搜索
export const getPrjCondition = params => {
	return WeaTools.callApi('/api/proj/pcproject/prjcondition', 'GET', params);
}


//查詢項目 - 列表
export const getQueryPrjList = params =>{
	return WeaTools.callApi('/api/proj/pcproject/getPrjSearchList','GET', params);
}

//批量共享 - 列表
export const getBatchShareList = params =>{
	return WeaTools.callApi('/api/proj/pcproject/getBatchShareList','GET', params);
}

//项目监控- 列表
export const getPrjMonitorList = params =>{
	return WeaTools.callApi('/api/proj/pcproject/getPrjMonitorList','GET', params);
}


//项目卡片接口

//tab查询
export const getPrjTabs = params =>{
	return WeaTools.callApi('/api/proj/pcproject/getProjectTabs','GET', params);
}
//项目信息
export const getPrjInfo = params =>{
	return WeaTools.callApi('/api/proj/pcproject/getProjectInfo','GET', params);
}
//项目日志
export const getPrjLogList = params =>{
	return WeaTools.callApi('/api/proj/pcproject/prjLogList','GET', params);
}
//项目字段日志
export const getPrjFieldLogList = params =>{
	return WeaTools.callApi('/api/proj/pcproject/prjFieldLogList','POST', params);
}
//项目字段详情日志
export const getPrjFieldDetaiLogList = params =>{
	return WeaTools.callApi('/api/proj/pcproject/prjFieldDetailLogList','POST', params);
}

//项目信息 =-- 编辑保存
export const savePrjInfo = params =>{
	return WeaTools.callApi('/api/proj/pcproject/doPrjOperation','POST', params);
}

//项目信息 =-- 删除
export const delPrjInfo = params =>{
	return WeaTools.callApi('/api/proj/pcproject/doPrjOperation','POST', params);
}


//子项目
export const getPrjSubList = params =>{
	return WeaTools.callApi('/api/proj/pcproject/getSubProjectList','GET', params);
}

//相关交流
export const getPrjDiscuss = params =>{
	return WeaTools.callApi('/api/proj/pcproject/prjdiscuss','GET', params);
}

//相关交流（new）
export const getExchangeList = params =>{
	return WeaTools.callApi('/api/proj/pcproject/getExchangeList','GET', params);
}

//相关交流保存
export const exchangeSave = params =>{
	return WeaTools.callApi('/api/proj/prjutil/doDiscussOpt','POST', params);
}

//相关交流删除
export const exchangeDelete = params =>{
	return WeaTools.callApi('/api/proj/prjutil/exchangeDelete','GET', params);
}

//共享设置
export const getPrjShare = params =>{
	return WeaTools.callApi('/api/proj/pcproject/prjshare','GET', params);
}

//共享设置添加
export const addPrjShare = params => {
	return WeaTools.callApi('/api/proj/prjutil/doProjectShareOpt', 'POST', params);
}

//共享设置批量删除
export const delBatchPjrShare = params => {
	return WeaTools.callApi('/api/proj/prjutil/doProjectShareOpt', 'POST', params);
}

//统计报告
export const getPrjStastics = params =>{
	return WeaTools.callApi('/api/proj/pcproject/prjstastics','GET', params);
}

//任务列表
export const getPrjTaskList = params =>{
	return WeaTools.callApi('/api/proj/pcproject/getPrjViewProcess','GET', params);
}
//任务列表  -- 版本
export const getPrjTaskVersion = params =>{
	return WeaTools.callApi('/api/proj/pctask/gettaskversion','GET', params);
}
//任务列表  -- 相关流程-文档-写作-日志  列表
export const getPrjDspList = params =>{
	return WeaTools.callApi('/api/proj/pcproject/prjDspList','GET', params);
}

//任务列表  -- 通知项目成员
export const getNoticeMember= params =>{
	return WeaTools.callApi('/api/proj/pcproject/noticeMember','GET', params);
}

//任务列表  -- 历史版本对比
export const getPrjHisCompare = params =>{
	return WeaTools.callApi('/api/proj/pcproject/prjHisCompare','GET', params);
}


//项目执行
export const doPlanOpt = params =>{
	return WeaTools.callApi('/api/proj/pcproject/doPlanOpt','GET', params);
}

//项目另存为模板
export const doSaveTemplet = params =>{
	return WeaTools.callApi('/api/proj/pcproject/doSaveTemplet','GET', params);
}

//项目初始化导入
export const prjimptopt = params =>{
	return WeaTools.callApi('/api/proj/prjutil/prjimpopt','GET', params);
}

//WBS导入配置字段
export const getTaskWbsField = params =>{
	return WeaTools.callApi('/api/proj/prjutil/getTaskWbsField','POST', params);
}

//WBS导入配置字段
export const doTaskWbsFieldSave = params =>{
	return WeaTools.callApi('/api/proj/prjutil/doSaveTaskWbsField','POST', params);
}

//项目任务模板（重新生成项目类型模板）
export const doPrjTemplateFile = params =>{
	return WeaTools.callApi('/api/proj/prjutil/doPrjTemplateFile','GET', params);
}
//项目导入
export const doPrjimpopt = params =>{
	return WeaTools.callApi('/api/proj/prjutil/doprjimpopt','POST', params);
}

//批量共享
export const savePrjBatchShare = params =>{
	return WeaTools.callApi('/api/proj/pcproject/prjShareMultiOpt','POST', params);
}

/***********  报表   ********************** */

export const getPrjReport = params => {
	return WeaTools.callApi('/api/proj/prjReport/getPrjReport', 'GET', params);
}

export const getPrjReportCondition = params => {
	return WeaTools.callApi('/api/proj/prjReport/getRepCondition', 'GET', params);
}

//模板阶段设置
export const getPrjTempletStageList = params => {
	return WeaTools.callApi('/api/proj/pcproject/getPrjTempletStageList', 'GET', params);
}

//模板阶段保存
export const savePrjTempletStage = params => {
	return WeaTools.callApi('/api/proj/pcproject/savePrjTempletStage', 'POST', params);
}

//模板阶段保存
export const getPrjResources = params => {
	return WeaTools.callApi('/api/proj/pcproject/getPrjResources', 'GET', params);
}

//获取资产模块应用分权是否开启和 禁用所有人是否开启并配置应用列表
export const getDetachable = params => {
	return  WeaTools.callApi('/api/cpt/maint/getDetachable', 'GET', params);
}
